import myaxios from "../MyAxios";
import Base from "../Base";
const MMURL = Base.MMURL;

const showingonPlanApi = {
  /**
   * 添加排片计划接口
   * @param {Object} params
   */
  add(params) {
    return myaxios.post(MMURL + "/plan/add", params);
  },

  /**
   * 通过roomId,查询放映厅列表
   * @param {Object} params {room_id:1}
   */
  queryByRoomId(params){
    return myaxios.get(MMURL + "/plans/roomid",params)
  },

  /**
   * 根据ID删除排片计划
   * @param {Object} params {id:1}
   */
  delete(params){
    return myaxios.post(MMURL + "/plan/del",params)
  },

  /**
   * 发布排片计划
   * @param {Object} params {id:1}
   */
  publish(params){
    return myaxios.post(MMURL + "/plan/publish",params)
  },

  /**
   * 讲排片计划设置未发布状态
   * @param {Object} params {id:!}
   */
  noPublish(){
    return myaxios.post(MMURL + "/plan/no-publish",params)
  }
};

export default showingonPlanApi
